Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustfmt: Run on util/* (2/2) #3323

Open
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

tnull
Copy link
Contributor

@tnull tnull commented Sep 18, 2024

This is PR 2/2, based on #3324.

The diff is a bit larger for this one, but AFAICT the changes look mostly reasonable (besides the oddity commented below).

FWIW, I had a look at currently open inflight PRs and the conflicts should be minimal if I'm not overlooking something.

Copy link

codecov bot commented Sep 18, 2024

Codecov Report

Attention: Patch coverage is 82.29572% with 182 lines in your changes missing coverage. Please review.

Project coverage is 90.50%. Comparing base (8da30df) to head (0750550).
Report is 30 commits behind head on main.

Files with missing lines Patch % Lines
lightning/src/util/test_channel_signer.rs 50.64% 8 Missing and 69 partials ⚠️
lightning/src/util/test_utils.rs 85.09% 63 Missing and 2 partials ⚠️
lightning/src/util/ser.rs 74.24% 17 Missing ⚠️
lightning/src/util/ser_macros.rs 90.19% 9 Missing and 1 partial ⚠️
lightning/src/util/wakers.rs 93.00% 5 Missing and 2 partials ⚠️
lightning/src/util/transaction_utils.rs 94.17% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3323      +/-   ##
==========================================
+ Coverage   89.61%   90.50%   +0.89%     
==========================================
  Files         129      130       +1     
  Lines      105506   114132    +8626     
  Branches   105506   114132    +8626     
==========================================
+ Hits        94544   103293    +8749     
+ Misses       8208     8109      -99     
+ Partials     2754     2730      -24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tnull tnull force-pushed the 2024-09-rustfmt-util branch 2 times, most recently from 6c4dd83 to 9b991df Compare September 18, 2024 08:42
@TheBlueMatt
Copy link
Collaborator

Ugh, can we split this? 42 commits in one PR is just a lot...

@tnull
Copy link
Contributor Author

tnull commented Sep 18, 2024

Ugh, can we split this? 42 commits in one PR is just a lot...

Alright, happy to if you prefer (although at least half of these commits are one-line diffs). Now split out ~the first half of commits to #3324.

@tnull tnull changed the title rustfmt: Run on util/* rustfmt: Run on util/* (2/2) Sep 18, 2024
@tnull tnull force-pushed the 2024-09-rustfmt-util branch 2 times, most recently from 60ae0af to e2dcdc7 Compare September 19, 2024 08:10
@tnull
Copy link
Contributor Author

tnull commented Sep 19, 2024

Rebased after #3327 landed.

@tnull
Copy link
Contributor Author

tnull commented Oct 1, 2024

Rebased after #3324 landed.

@tnull
Copy link
Contributor Author

tnull commented Oct 7, 2024

Rebased to resolve minor conflicts.

@tnull
Copy link
Contributor Author

tnull commented Nov 5, 2024

Rebased once more to resolve minor conflicts.

Any additional comments here after we landed the split-out commits in #3324, @TheBlueMatt ?

@tnull
Copy link
Contributor Author

tnull commented Nov 18, 2024

Rebased once more to resolve minor conflicts.

Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some initial comments. Maybe could have been split across PRs.

lightning/src/util/ser_macros.rs Show resolved Hide resolved
lightning/src/util/ser_macros.rs Outdated Show resolved Hide resolved
lightning/src/util/ser_macros.rs Outdated Show resolved Hide resolved
lightning/src/util/ser_macros.rs Show resolved Hide resolved
lightning/src/util/ser_macros.rs Show resolved Hide resolved
lightning/src/util/ser_macros.rs Outdated Show resolved Hide resolved
do_test!(concat!("01", "08", "0100000000000000"), Some(72057594037927936), None, None, None);
do_test!(concat!("02", "08", "0000000000000226"), None, Some((0 << 30) | (0 << 5) | (550 << 0)), None, None);
do_test!(
concat!("01", "08", "0100000000000000"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how much readable it would be pulling out stuff here into variables? Seems that might just make stuff more confusing?

lightning/src/util/test_channel_signer.rs Outdated Show resolved Hide resolved
lightning/src/util/transaction_utils.rs Outdated Show resolved Hide resolved
lightning/src/util/transaction_utils.rs Outdated Show resolved Hide resolved
@tnull
Copy link
Contributor Author

tnull commented Dec 3, 2024

Addressed all but one comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants